#ifndef CUSTOMBTN_H
#define CUSTOMBTN_H

#include <QPushButton>
#include <QPainter>
#include <QPaintEvent>

class BigBtn : public QPushButton
{
private:
    bool pressed = false;
    int cornerRadius;

    QWidget* indicator;

    QColor bgColor;
    //button styleSheet
    QString defaultColor = "background-color:#07000000";
    QString hoverColor = "background-color:#1F0078D4";
    QString pressColor = "background-color:#3F0078D4";
    QString borderRadius = QString::asprintf("border-radius:%dpx;", cornerRadius);
    //indicator styleSheet
    QString indicatorDefaultStyle = "border-radius:3px;background-color:#afafaf";
    QString indicatorHoverStyle = "border-radius:3px;background-color:#0078d4";

protected:
    void enterEvent(QEvent* event) override;
    void leaveEvent(QEvent* event) override;
    void mousePressEvent(QMouseEvent* event) override;
    void mouseReleaseEvent(QMouseEvent* event) override;
    void resizeEvent(QResizeEvent* event) override;

public:
    BigBtn(QSize size, int radius, QWidget* parent);
    ~BigBtn() = default;
};

#endif // CUSTOMBTN_H
